home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscDragViews / MiscViews.subproj / MiscImageDragView.h < prev    next >
Encoding:
Text File  |  1995-04-12  |  1.6 KB  |  46 lines

  1. /***************************************************************************
  2.   CLASS:            MiscImageDragView
  3.   INHERITS FROM:    MiscDragView
  4.   PROGRAMMER:        Todd Thomas
  5.   START DATE:        Feb 15, 1993
  6.   LAST CHANGED:        November 30, 1994
  7.   VERSION:            0.4
  8.   CHANGES:            See the end of the implementation file.
  9.  
  10.      A class that allows you to drag and drop any images that NXImage
  11.   understands. That includes data from NXTIFFPboardType, 
  12.   NXFilenamePboardType, and NXPostScriptPboardType.
  13.   I don't know how useful this class actually is, but it is here as
  14.   more of an example of how to use MiscDragView. As for options, you have
  15.   the option of either dragging the image in the view or just the icon
  16.   representation (which will be the TIFF icon). For now, though the well will 
  17.   accept a lot of different types of data, it will only put TIFF data on
  18.   the pasteboard in preparation of a source drag.  
  19.  
  20.  * Copyright (C) 1995 Robert Todd Thomas
  21.  * Use is governed by the MiscKit license         
  22.  ****************************************************************************/
  23.  
  24. #import <appkit/appkit.h>
  25. #import <misckit/MiscDragView.h>
  26.  
  27. @interface MiscImageDragView : MiscDragView
  28. {
  29.     BOOL  dragIconRepresentation;        // drag icon rep. or the entire image?
  30. }
  31.     
  32. - initFrame: (NXRect *)frameRect;
  33. - initDragTypes;
  34. - setDragIconRepresentation: (BOOL)aBool;
  35. - (BOOL)dragIconRepresentation;
  36.  
  37. - (BOOL)setupForSourceDrag;
  38. - calculateDragPoint: (NXPoint *)dragPoint andOffset: (NXPoint *)offset;
  39. - (BOOL)prepareForDragOperation:sender;
  40. - (BOOL)performDragOperation: sender;
  41.  
  42. - read: (NXTypedStream *)stream;
  43. - write: (NXTypedStream *)stream;
  44.  
  45. @end
  46.